home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Video Toaster 4.3
/
Video Toaster v4.3.iso
/
4.2
/
arexx
/
toasterpaint
/
clip2iff30frm.rexx
< prev
next >
Wrap
OS/2 REXX Batch file
|
1998-04-16
|
2KB
|
97 lines
/* Clip2IFF30Frm.rexx V2.0 -- Export a clip as IIF Files */
/* By Bob Caron © 1995 NewTek Inc. */
parse arg InClipName","OutClipName","StartFrame","EndFrame
Address "DigiPaint"
options results
IFFBaseName=OutClipName
if EndFrame="" then do
'Askb'"Please select;A source clip."
exit
end
if ~show('l','rexxsupport.library') then do
if ~addlib('rexxsupport.library',0,-30,34) then do
exit
end
end
dots=0
XWin = 100
YWin = 40
Clear = d2c(12)
nv = ''
cr = '0a'x
call getfontsize
wid = width*48
hei = theight+height*10
if ~open('Window','RAW:'XWin'/'YWin'/'wid'/'hei'/Clip2IFF30Frm Script V2.0 - CTRL-C to Abort/NOSIZE/SCREEN 'ps,'W') then do
exit
end
if inclipname="" then do
'Askb'"You need a;Source Clip!"
exit
end
i=0
endframe=StartFrame+((EndFrame-StartFrame)/2)
OutName=IFFBaseName||"."||i
do i = StartFrame to EndFrame
call OpenWindow(InclipName,OutName,i,EndFrame,i)
'Gnfm' /* Get Field and inc */
OutName=IFFBaseName||"."||i /* Setup save name */
call OpenWindow(InclipName,OutName,i,EndFrame,i)
'Asav'OutName /* Write out RGB */
end
exit
OpenWindow:
parse arg InclipName,OutClipName,currentframe,EndFrame,Frame
pdots="...."
dots=dots+1
if dots>4 then dots=1
call writech('Window',Clear||nv||cr)
call writech('Window','Current Source Clip ['InClipName']'cr)
call writech('Window',' Current Dest IFF ['OutClipName']'cr)
call writech('Window',''cr)
call writech('Window','Current Frame: 'Frame''cr)
call writech('Window',' End Frame: 'EndFrame''cr)
call writech('Window',''cr)
call writech('Window','Processing'right(pdots,dots)||cr)
return
getfontsize:
if open('font','env:sys/font.prefs','R') then do
font = readch('font',word(statef('env:sys/font.prefs'),2))
call close('font')
font = substr(font,index(font,'FONT')+4)
font = substr(font,index(font,'FONT')+4)
height = c2d(substr(font,29,2))
tfont = substr(font,index(font,'FONT')+4)
theight = c2d(substr(tfont,29,2))
font = substr(font,33)
font = left(font,index(font,d2c(0))-1-5)
if open('font','FONTS:'font'/'height,'R') then do
width = c2d(right(readch('font',116),2))
call close('font')
end
else if height=9 then width = 10
else width = 8
end
else do
theight = 8
height = 8
width = 8
end
return